<{include file="block/small-header.html"}>
<!--面包屑导航开始-->
<div class="mb10 subwd sub_topnav">
		<p><span class="ico_list breadna"></span>您的位置：
            <a href="<{link ctl='index'}>"><{$CONFIG.site.title}></a>&gt;
            <a href="<{link ctl='youhui:items'}>">优惠活动</a>&gt;
            <a href="<{link ctl='youhui:detail' arg0=$detail.youhui_id}>"><{$detail.title}></a>
		</p>
</div>
<!--面包屑导航结束-->
<div class="subwd mb20">
	<!--左边内容开始-->
	<div class="sub_activity_lt lt">
		<div class="mb10 area sub_activity pding">
			<h2 class="title"><b><{$detail.title}></b><div class="coDe">
			<div class="pic">[ 手机扫码 ]<img src="%THEME%/static/images/codeico.jpg" /></div>
			<div class="show" id="QRimg" style="padding:5px;height:150px;width:150px;" val="<{$mobile_url}>"></div>
			</div></h2>
			<div class="sub_activity">
				<a class="lt pic"><img src="<{$pager.img}>/<{$detail.photo}>" /></a>
				<div class="sub_activity_rt rt">
                    <p class="title"><{if $detail.ltime>time() && $detail.stime<time()}><span class="ico_list sub_youhui_time"></span><{else}><span class="ico_list sub_over_time_ico"></span><{/if}><span  remaintime="<{$detail.ltime}>"></span></p>
					<p>开始时间：<{$detail.stime|format:'Y-m-d'}></p>
					<p>结束时间：<{$detail.ltime|format:'Y-m-d'}></p>
					<p>所属公司：<{$company.name}></p>
					<h2><{if $detail.ltime>time()}><a href="<{link ctl='youhui:sign' arg0=$detail.youhui_id http='ajax'}>"  mini-load="我要报名" mini-width="500"  class="btn btn_sub_tuan">我要报名</a>
                    <{else}><a href="javascript:;" class="btn btn_over_tuan">报名已结束</a>
                    <{/if}><span>报名人数：<b class="fontcl2"><{$detail.sign_num}></b>名</h2>
				</div>
				<div class="cl"></div>
			</div>
		</div>
		<div class="mb20 area">
			<h3 class="side_tit">活动详情</h3>
			<div class="pding"><{$detail.content}></div>
		</div>
	</div>
	<div class="side_content rt">
		<div class="area sub_activity_sj mb10">
			<h3><b>商家信息</b></h3>
			<a href="<{$company.company_url}>" class="pic"><img src="<{$pager.img}>/<{$company.logo}>" /></a>
			<p><a href="<{$company.company_url}>" class="tit"><b><{$company.name}></b></a></p>
            <p>信誉指数：<{$company.score}></p>
			<p>在线客服：<{$company.show_qq|qq:1}></p>
            <p>联系电话：<{$company.show_phone}></p>
			<p>服务热线：<{$company.show_phone}></p>
		</div>
		<div class="area mb20 pding sub_activity_qita">
			<h3><span class="lt">其他优惠信息</span><a href="<{link ctl='youhui:items'}>" class="rt">更多>></a></h3>
			<div class="cl"></div>
			<ul>
            <{foreach from=$items item=item}>
            	<li>
					<a href="<{link ctl='youhui:detail' arg0=$item.youhui_id}>"><img src="<{$pager.img}>/<{$item.photo}>" /></a>
					<p><a href="<{link ctl='youhui:detail' arg0=$item.youhui_id}>"><{$item.title}></a></p>
					<p>已售：<font class="fontcl2"><{$item.sign_num}></font></p>
				</li>
            <{/foreach}>
			</ul>
		</div>
	</div>
	<!--右边内容结束-->
	<div class="cl"></div>
</div>
<script type="text/javascript" src="<{$pager.res}>/script/cloud-zoom.js"></script>
<script type="text/javascript" src="<{$pager.res}>/script/raty/jquery.raty.js"></script>
<script type="text/javascript" src="<{$pager.res}>/script/jquery.qrcode.min.js"></script>
<script type="text/javascript">
$(".coDe ").mouseover(function(){
	$(this).find(".show").show();
}).mouseleave(function(){
	$(this).find(".show").hide();
});

(function(K, $){
	$("#QRimg").qrcode({width:150,height:150,correctLevel:0,text:"<{$mobile_url}>"}); 
    $(function(){
    var dateTime = new Date();
    var difference = dateTime.getTime() - <{$pager.dateline}>*1000;	
    setInterval(function(){
      $("[remaintime]").each(function(){
        var obj = $(this);
        var endTime = new Date(parseInt(obj.attr('remaintime')) * 1000);
        var nowTime = new Date();
        var nMS=endTime.getTime() - nowTime.getTime() + difference;
        var myD=Math.floor(nMS/(1000 * 60 * 60 * 24));
        var myH=Math.floor(nMS/(1000*60*60)) % 24;
        var myM=Math.floor(nMS/(1000*60)) % 60;
        var myS=Math.floor(nMS/1000) % 60;
        var myMS=Math.floor(nMS/100) % 10;
        if(myD>= 0){
			var str = myD+"天"+myH+"小时"+myM+"分"+myS+"."+myMS+"秒";
        }else{
			var str = "真遗憾您来晚了，抢购已经结束。";	
		}
		obj.html(str);
      });
    }, 100);
});
})(window.KT, window.jQuery);
</script>
<{include file="block/small-footer.html"}>
